"""
Browser configuration settings
"""

# Browser launch arguments
BROWSER_ARGS = [
    '--disable-blink-features=AutomationControlled',
    '--disable-features=IsolateOrigins,site-per-process',
    '--disable-site-isolation-trials'
]

# User agents
USER_AGENTS = [
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15'
]

# Browser context settings
CONTEXT_SETTINGS = {
    'viewport': {'width': 1024, 'height': 768},
    'locale': 'en-US',
    'timezone_id': 'America/New_York',
    'geolocation': {'latitude': 40.7128, 'longitude': -74.0060},  # New York coordinates
    'permissions': ['geolocation'],
    'color_scheme': 'light',
    'device_scale_factor': 1,
    'is_mobile': False,
    'has_touch': False,
    'java_script_enabled': True,
    'accept_downloads': True
}

# Stealth scripts
STEALTH_SCRIPTS = [
    # Hide webdriver
    "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})",
    # Add language
    "Object.defineProperty(navigator, 'languages', {get: () => ['en-US', 'en']})",
    # Add plugins
    "Object.defineProperty(navigator, 'plugins', {get: () => [1, 2, 3, 4, 5]})",
    # Add platform
    "Object.defineProperty(navigator, 'platform', {get: () => 'Win32'})",
    # Add hardware concurrency
    "Object.defineProperty(navigator, 'hardwareConcurrency', {get: () => 8})",
    # Add device memory
    "Object.defineProperty(navigator, 'deviceMemory', {get: () => 8})"
]

# Timeout settings
TIMEOUT_SETTINGS = {
    'default_timeout': 30000,  # 30 seconds
    'navigation_timeout': 30000,
    'wait_for_selector_timeout': 30000
}

# Delay settings
DELAY_SETTINGS = {
    'min_delay': 0.5,
    'max_delay': 1.5,
    'final_wait': 3
} 